Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(install): re-setup bin entries after running lifecycle scripts #26752

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

nathanwhit
Copy link
Member

Fixes #26677

Some packages (like supabase) declare bin entries that don't exist until lifecycle scripts are run. For instance, the lifecycle script downloads a binary file which serves as a bin entrypoint.

Unfortunately you can't just defer setting up the bin entries until after lifecycle scripts have run, because the scripts may rely on them.

I looked into this, and PNPM just re-links bin entries after running lifecycle scripts. I think that's about the best we can do as well.

Note that we'll only re-setup bin entries for packages whose lifecycle scripts we run. This should limit the performance cost, as typically a given project will not have many lifecycle scripts (and of those, many of them probably don't have bin entries to set up).

@nathanwhit nathanwhit force-pushed the bin-entry-setup-by-lifecycle branch from 998a5f6 to 9a6b13b Compare November 8, 2024 03:27
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nathanwhit nathanwhit merged commit c371b2a into denoland:main Nov 12, 2024
17 checks passed
@nathanwhit nathanwhit deleted the bin-entry-setup-by-lifecycle branch November 12, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installing a npm package with a bin populated by a postinstall script doesn't work
2 participants